import request from '@/utils/request'

// 查询机构开通区域列表
export function listOrgRegion(query) {
  return request({
    url: '/system/orgRegion/list',
    method: 'get',
    params: query
  })
}

export function getOrgTreeList(tenantId) {
  return request({
    url: '/system/orgRegion/treeList/' + tenantId,
    method: 'get'
  })
}

// 查询机构开通区域详细
export function getOrgRegion(orgRegionId) {
  return request({
    url: '/system/orgRegion/' + orgRegionId,
    method: 'get'
  })
}

// 新增机构开通区域
export function addOrgRegion(data) {
  return request({
    url: '/system/orgRegion',
    method: 'post',
    data: data
  })
}

// 修改机构开通区域
export function updateOrgRegion(data) {
  return request({
    url: '/system/orgRegion',
    method: 'put',
    data: data
  })
}

// 删除机构开通区域
export function delOrgRegion(orgRegionId) {
  return request({
    url: '/system/orgRegion/' + orgRegionId,
    method: 'delete'
  })
}
